from fastapi import APIRouter

from core.Response import success
from core.Utils_arkN import ArkNight
from validator.arkn import BaseRequest

router = APIRouter()


@router.post("/analysis")
async def analysis(tokenreq: BaseRequest):
    ark = ArkNight(tokenreq.token)
    dic = await ark.auto_process()
    return success(data=dic, msg="请求成功")


# @router.get("/analysis")
# async def analysis(token: str):
#     ark = ArkNight(token)
#     dic = await ark.auto_process()
#     return success(data=dic, msg="请求成功")
